<script>
    import { Checkbox } from '@svelteuidev/core';
    //接收父级传来的表单
    export let options = [];
    export let label = '';
    export let name = '';
</script>

<div>
    <div class="form-group">
        <label>{label}</label>
        <div>
            {#each options as item, index}
                <span class="icheck">
                    <label class="checkbox-inline">
                        <Checkbox  label="{label}" name="{item.dataIndex}[]" value="{item.option}" />
                    </label>
                </span>
            {/each}
        </div>
        <input type="hidden" name="{name}[]">
    </div>

</div>